package com.xuecheng.content.agent;

import com.xuecheng.api.media.model.dto.MediaDTO;
import com.xuecheng.common.constant.XcFeignServiceNameList;
import com.xuecheng.common.domain.response.RestResponse;
import com.xuecheng.content.agent.sentinel.MediaApiAgentFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 媒资管理的远程调用
 * @author wuyunyun
 * @data 2021/10/14 0:12
 */

@FeignClient(value = XcFeignServiceNameList.XC_MEDIA_SERVICE,fallback = MediaApiAgentFallback.class)
@Component
public interface MediaApiAgent {

    @GetMapping("/media/l/media/{mediaId}")
    RestResponse<MediaDTO> getMedia4s(@PathVariable  Long mediaId);
}
